package com.bdd.service.impl;

import com.bdd.common.AjaxResponseResult;
import com.bdd.dao.ContactDao;
import com.bdd.dto.ContactDto;
import com.bdd.entities.Contact;
import com.bdd.service.ContactService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author Bdd
 * @Description
 * @Date 2020/4/2 4:43
 */
@Service
public class ContactServiceImpl implements ContactService {

    @Resource
    private ContactDao contactDao;


    @Override
    public AjaxResponseResult save(ContactDto contactDto) {
        Contact contact = new Contact();
        BeanUtils.copyProperties(contactDto,contact);
        contactDao.save(contact);
        return null;
    }
}
